﻿export default [
  {
    name: '',
    path: '/test',
    component: './test',
  },
  {
    name: '',
    path: '/infiniteScroller',
    component: './test/infiniteScroller',
  },

  //php通过iframe访问该地址把 token 注入本地
  {
    path: '/token/login',
    component: '@/pages/pc/token/login',
  },
  //php通过iframe访问该地址把 token 删除本地
  {
    path: '/token/logout',
    component: '@/pages/pc/token/logout',
  },
  {
    name: '',
    path: '/class',
    component: '@/layouts/pc/DetailLayout',
    routes: [
      { path: '/class/courses/detail/:id', component: './pc/courses/detail' }, // 课程详情
    ],
  },
  {
    name: '',
    path: '/center',
    component: '@/layouts/pc/CenterLayout',
    routes: [
      {
        path: '/center',
        redirect: '/center/test',
      },
      {
        path: '/center/test', // 个人中心
        component: './pc/account/personal',
      },
      {
        path: '/center/upload-courses', // 上传课程
        component: './pc/lecturer/upload-courses',
      },
      {
        path: '/center/lecturer/detail/:id', // 预览课程
        component: './pc/courses/detail',
      },

      { path: '/center/courses/detail/:id', component: './pc/courses/detail' }, // 课程详情
      {
        path: '/center/detail/works/:page',
        component: './pc/detailWorks',
      },
      {
        path: '/center/upload/work', // 上传作业
        component: './pc/learning/uploadWork',
      },
      {
        path: '/center/video/player/:classId', // 课程点播
        component: './pc/video/player',
      },
      {
        path: '/center/work/detail/:bid', // 单个课程详情
        component: './pc/workDetail',
      },
    ],
  },
  {
    path: '/contract',
    routes: [
      {
        path: '/contract',
        component: '@/pages/pc/contract/index',
      },
    ],
  },
  { path: '/test/:page', component: '@/pages/test/index' },
  {
    name: '',
    path: '/',
    component: '@/layouts/pc/IndexLayout',
    routes: [
      {
        path: '/',
        name: 'index',
        component: './pc/Index',
      },
      {
        path: '/works/:page',
        component: './pc/works',
      },
      {
        path: '/account', // 帐号中心
        component: './pc/account',
      },
      {
        path: '/personal', // 个人中心
        component: './pc/account/personal',
      },
      // {
      //   path: '/teachers/introduce/:page', // 讲师介绍列表
      //   component: './pc/teachers',
      // },
      {
        path: '/teachers/apply', // 讲师申请
        component: './pc/teachers/apply',
      },
      {
        path: '/teachers/detail/:id', // 讲师详情
        component: './pc/teachers/detail',
      },
      { path: '/courses/:page', component: './pc/courses' }, // 全部课程
      { path: '/lecturer', component: './pc/lecturer' }, // 讲师中心
      { path: '/lecturer/works', component: './pc/lecturer/works' }, // 讲师中心/批改作业
      { path: '/learning', component: './pc/learning' }, // 学习中心
      { path: '/message', component: './pc/message' }, // 消息中心
      { path: '/order', component: './pc/order' }, // 购买记录
      {
        component: './404',
      },
    ],
  },
  {
    component: './404',
  },
];
